/*
   @Copyright:Luogu
   @Author:   tjyemail
   @Problem:  https://www.luogu.com.cn/problem/P1919
   @Language: C++
   @Datetime: 20-12-14 17:07
   */

#include <bits/stdc++.h>
using namespace std;
static const int P=998244353, G=3;

// (a^n)%p
inline int64_t pod(int64_t a, int n, int p)
{
	int64_t b = 1;
	for(; n; n>>=1) {
		if (n&1) b = (b*a)%p;
		a = (a*a)%p;
	}
	return b%p;
}

void ntt(vector<int64_t> &A, const vector<int> &bits, int n, int g)
{
	// bit reverse
	for(int i=0; i<n; ++i)
		if (i<bits[i]) swap(A[i], A[bits[i]]);
	for(int mid=1; mid<n; mid<<=1) {
		const int64_t wn = pod(g, (P-1)/(mid<<1), P);
		for(int offset=0; offset<n; offset+=mid<<1) {
			int64_t w = 1;
			for(int t=0; t<mid; ++t, w=(w*wn)%P) {
				const int i=offset+t, j=offset+mid+t;
				// butterfly transform
				const int64_t tmp = w*A[j]%P;
				A[j] = (A[i]-tmp+P)%P;
				A[i] = (A[i]+tmp)%P;
			}
		}
	}
}

// big endian
string mulntt(string &a, string &b)
{
	// prepare n=2^bit, bit reverse array
	int la=a.length(), lb=b.length(), n=1, bit=0;
	while(n<la+lb) n<<=1, ++bit;
	vector<int> bits(n, 0);
	for(int i=1; i<n; ++i)
		bits[i] = (bits[i>>1]>>1) | ((i&1)<<(bit-1));
	// convert string to num array at little endian
	vector<int64_t> A(n, 0), B(n, 0);
	for(int i=la; i--; A[la-i-1]=a[i]-'0');
	for(int i=lb; i--; B[lb-i-1]=b[i]-'0');
	ntt(A, bits, n, G);
	ntt(B, bits, n, G);
	for(int i=n; i--; A[i]=A[i]*B[i]%P);
	ntt(A, bits, n, (P+1)/G);
	const int64_t p = pod(n, P-2, P);
	// convert num array to string at little endian
	string c(la+lb, '0');
	for(long i=0, t=0; i<la+lb; ++i) {
		t += (A[i]*p%P);
		c[i] = t%10+'0';
		t /= 10;
	}
	// trim last 0
	while(!c.empty() && c.back()=='0') c.pop_back();
	if (c.empty()) return "0";
	reverse(c.begin(), c.end());
	return c;
}

int main()
{
	for(string a, b, c; cin>>a>>b; ) {
		c = mulntt(a, b);
		cout<<c<<endl;
	}
	return 0;
}
